disableSerialization;
_n = _this select 0;

private "_myDualList2";

_camp=var_console_valid_camp;

console_valid_type = lbCurSel 10305;

_type=lbText [10305, console_valid_type]; 

if (_n == 0) then 
{

		nom_console_valid_type = _type ;
		var_console_valid_type = _type ;


		//call compile format ["_MydualList2 = %1_%2 call Dlg_GenerateList",_camp,_type];
		call compile format ["_MydualList2 = %1_%2",_camp,_type];
			
		[10306, _MydualList2] call Dlg_FillListBoxLists;
		 
		
		// On montre l'attitude
		ctrlShow [10211,true];
		ctrlShow [10212,true];
		ctrlShow [10213,true];
			
		// On montre la vitesse
		ctrlShow [10214,true];
		ctrlShow [10215,true];
		ctrlShow [10216,true];
		
		// On montre le mouvement
		ctrlShow [10217,true];
		ctrlShow [10218,true];
		ctrlShow [10219,true];
		
		// On montre le moral
		ctrlShow [10220,true];
		
		// On montre le 3D & Preview
		ctrlShow [10210,true];
		ctrlShow [10399,true];
		
		ctrlShow [10225,true];
		ctrlShow [10226,true];
		ctrlShow [10227,true];
		
	//Hidding group preview and 3D
	if (_type == "Group") then 
	{
	 	ctrlShow [10210,false];
		ctrlShow [10399,false];

	};
		
	//Object
	if (_type in type_objects) then 
	{
	/*
	lbSetCursel [10218,0];
	console_valid_mouvement = 0 ;
		_n = [0] execVM "computer\console\boutons\console_valid_mouvement.sqf";waitUntil {scriptDone _n};
	*/	
		// On masque l'attitude
		ctrlShow [10211,false];
		ctrlShow [10212,false];
		ctrlShow [10213,false];
		
		// On masque la vitesse
		ctrlShow [10214,false];
		ctrlShow [10215,false];
		ctrlShow [10216,false];
		
		// On masque le mouvement
		ctrlShow [10217,false];
		ctrlShow [10218,false];
		ctrlShow [10219,true];
		ctrlShow [10304,false];
		
		// On montre le 3D & Preview
		ctrlShow [10210,true];
		ctrlShow [10399,true];
		
		// On masque le moral
		ctrlShow [10220,false];
		
		ctrlShow [10225,false];
		ctrlShow [10226,false];
		ctrlShow [10227,false];
	};

	if (_type == "Base" or _type == "Composition") then 
	{
	/* 
	  lbSetCursel [10218,0];
		console_valid_mouvement = 0;
		_n = [0] execVM "computer\console\boutons\console_valid_mouvement.sqf";waitUntil {scriptDone _n};
	*/	
		// On montre l'attitude
		ctrlShow [10211,false];
		ctrlShow [10212,false];
		ctrlShow [10213,false];
		
		// On cache la vitesse
		ctrlShow [10214,false];
		ctrlShow [10215,false];
		ctrlShow [10216,false];
		
		// On cache le mouvement
		ctrlShow [10217,false];
		ctrlShow [10218,false];
		//ctrlShow [10219,false];
		ctrlShow [10304,false];
		ctrlShow [10220,true];
		
		// On cache le 3D & Preview
		ctrlShow [10210,false];
		ctrlShow [10399,false];
		
		// On montre le moral
		
		ctrlShow [10225,true];
		ctrlShow [10226,true];
		ctrlShow [10227,true];
	};

//No movements for statics	
if (_type == "Static") then 
{		
    /*	
	  lbSetCursel [10218,0];
		console_valid_mouvement = 0;
		*/
		// On cache le mouvement
		ctrlShow [10217,false];
		ctrlShow [10218,false];


};
	/*
	_n = [0] execVM "computer\console\boutons\console_joueur_scripteur.sqf";waitUntil {scriptDone _n};
	_n = [0] execVM "computer\console\boutons\console_valid_unite.sqf";waitUntil {scriptDone _n};
	*/
	
	
};

if (!(isnil "Typesave") and (Typesavewait>1))then {lbSetCurSel [10305, Typesave];Typesave=nil;Typesavewait=0}; 
Typesavewait=Typesavewait+1;

if (true) exitWith {};
